import request from '@/utils/request'

// 查询令牌余量列表
export function listSkToken(query) {
  return request({
    url: '/business/sk-token/list',
    method: 'get',
    params: query
  })
}

// 查询令牌余量详细
export function getSkToken(id) {
  return request({
    url: '/business/sk-token/' + id,
    method: 'get'
  })
}

// 新增令牌余量
export function addSkToken(data) {
  return request({
    url: '/business/sk-token',
    method: 'post',
    data: data
  })
}

// 修改令牌余量
export function updateSkToken(data) {
  return request({
    url: '/business/sk-token',
    method: 'put',
    data: data
  })
}

// 删除令牌余量
export function delSkToken(id) {
  return request({
    url: '/business/sk-token/' + id,
    method: 'delete'
  })
}

// 查询令牌余量分组列表
export function listSkTokenByGroup(query) {
  return request({
    url: '/business/sk-token/listByGroup',
    method: 'get',
    params: query
  })
}